#include "stdafx.h"
#include "ckCheckCase.h"
#include "ckEnumOperator.h"
#include "ckCheckCaseManager.h"

namespace ck
{
	CheckCase::CheckCase(z_uint32 ID)
	{
		m_nID = ID;
	}
	
	CheckCase::~CheckCase()
	{
	}

	z_uint32 CheckCase::GetID()
	{
		return m_nID;
	}

	void CheckCase::SetCode(z_uint32 nCode)
	{
		m_nCode = nCode;
	}

	void CheckCase::SetCode(const char* szCode)
	{
		if (szCode)
		{
			m_strCode = szCode;
		}
		else
		{
			m_strCode.clear();
		}
	}

	void CheckCase::SetName(const char* szName)
	{
		if (szName)
		{
			m_strName = szName;
		}
		else
		{
			m_strName.clear();
		}
	}

	void CheckCase::SetModeCode(z_uint32 nModelCode)
	{
		m_nModelCode = nModelCode;
	}

	z_uint32 CheckCase::GetCode()
	{
		return m_nCode;
	}
	const char*	CheckCase::GetSCode()
	{
		return m_strCode.c_str();
	}

	const char* CheckCase::GetName()
	{
		return m_strName.c_str();
	}

	z_uint32 CheckCase::GetModeCode()
	{
		return m_nModelCode;
	}

	void CheckCase::SetDescription(const char* szDescription)
	{
		if (szDescription)
		{
			m_strDescription = szDescription;
		}
		else
		{
			m_strDescription.clear();
		}
	}

	const char* CheckCase::GetDescription()
	{
		return m_strDescription.c_str();
	}

	EnumOperator* CheckCase::GetOperators()
	{
		CheckCaseManager* pCaseManager = CheckCaseManager::GetInstance();
		return pCaseManager->GetOperators(m_nCode);
	}
}

